Repository navigation
fix: count a near-miss usage-reporting opt-out as off - #102
Merged
Merged
Conversation
Spring binds only usage-reporting.enabled and its relaxed forms, so usage_reporting.enable=false, usage-reporting.disabled=true, usage-reporting=false, usage.reporting.enabled=false or USAGE_REPORTING=off were ignored and reporting stayed on. Each now counts as off. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LYNeupL3KtraCJoZMADVQE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
NearMissOptOutis added, andUsageReporter's Spring constructor now takes theEnvironmentand passesfalseas the switch when any property source holds an opt-out under a name Spring does not bind tousage-reporting.enabled:usage_reporting.enable,usage.reporting.enabled,USAGE_REPORTING_ENABLE, ...) whose value is not clearly on;usage-reporting.disabled,USAGE_REPORTING_DISABLED, ...) whose value is on;usage-reporting=false,USAGE_REPORTING=off) that is not clearly on.Names Spring already binds to the switch (
usageReporting.enabled,Usage_Reporting.Enabled,USAGE_REPORTING_ENABLED) are left to Spring, andTRACE_USAGE_REPORTINGis left to the client.Why
A real-server repro of a Bukkit plugin showed that an opt-out written under another spelling was not recognised and reporting stayed on. Parpt had the same blind spot for spellings outside Spring's relaxed binding: they were ignored and the default (
true) applied. Reference fix: Dans-Plugins/Medieval-Roleplay-Engine#418Tests
NearMissOptOutTestwas added (near-miss opt-outs in a file and in the environment are off; near-miss names that say on, unrelated*.enabled=falseproperties and a blankTRACE_USAGE_REPORTINGstay on; spellings Spring binds are read by Spring as the switch; the real switch is read as before)../gradlew --offline test: 201 tests, 0 failures. README updated.🤖 Generated with Claude Code
https://claude.ai/code/session_01LYNeupL3KtraCJoZMADVQE
drafted by Claude on behalf of Daniel Stephenson